//
//  HttpConnectionHandler.h
//
//  Created by Allen Thomas on 9/14/10.
//


@interface HttpConnectionHandler : NSObject {
	NSString		*username;
	NSString		*password;
	NSURL			*url;
	NSMutableData   *receivedData;
	NSMutableURLRequest	*theRequest;
	NSURLConnection *theConnection;
	id				 delegate;
	SEL				 callback;
	SEL				 errorCallback;
}

@property(nonatomic, retain) NSString	   *username;
@property(nonatomic, retain) NSString	   *password;
@property(nonatomic, retain) NSURL		   *url;
@property(nonatomic, retain) NSMutableData *receivedData;
@property(nonatomic, retain) id			    delegate;
@property(nonatomic) SEL					callback;
@property(nonatomic) SEL					errorCallback;

+ (id)withURL:(NSURL *)aUrl andUsername:(NSString *)aUsername andPassword:(NSString *)aPassword;
-(void)performHttpRequest:(id)requestDelegate withRequestSelector:(SEL)requestSelector;
-(void)processRequest;

@end
